package com.yourname.myapplication.Dao


import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.yourname.myapplication.model.StudyRecord
import kotlinx.coroutines.flow.Flow

@Dao
interface StudyRecordDao {
    @Insert
    suspend fun insertRecord(record: StudyRecord)

    @Query("SELECT * FROM study_records WHERE userId = :userId")
    fun getRecordsByUserId(userId: Int): Flow<List<StudyRecord>>

}